package ModelLayer;



import static org.junit.Assert.*;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

/**
 * The test class UTRent.
 *
 * @author  (your name)
 * @version (a version number or a date)
 */
public class UTRent
{
    private ModelLayer.RentCollection rentColl1;
    private ModelLayer.AddressBook addressB1;
    private ModelLayer.Person person1;
    private ModelLayer.Person person2;
    private ModelLayer.Person person3;
    private ModelLayer.AddressBook addressB2;
    private ModelLayer.DVD dVD1;
    private ModelLayer.DVD dVD2;
    private ModelLayer.DVDCollection dVDColle1;
    private ModelLayer.Copy copy1;
    private ModelLayer.Copy copy2;
    private ModelLayer.Copy copy3;
    private ModelLayer.Copy copy4;
    private ModelLayer.Rent rent1;
    private ModelLayer.RentCollection rentColl2;
    private ModelLayer.Rent rent2;

    /**
     * Default constructor for test class UTRent
     */
    public UTRent()
    {
    }

    /**
     * Sets up the test fixture.
     *
     * Called before every test case method.
     */
    @Before
    public void setUp()
    {
        rentColl1 = ModelLayer.RentCollection.getInstance();
        addressB1 = ModelLayer.AddressBook.getInstance();
        person1 = new ModelLayer.Person(1, "sad", "sdfdsf", 2, "fdgdsf", 555);
        addressB1.addPerson(person1);
        person2 = new ModelLayer.Person(1, "Kasper", "Sverigesgade 6", 9000, "Aalborg", 28779950);
        person3 = new ModelLayer.Person(2, "nikolaj", "Lindholmsvej 71", 9200, "NOrresundby", 23654878);
        addressB2 = ModelLayer.AddressBook.getInstance();
        addressB2.addPerson(person2);
        addressB2.addPerson(person3);
        dVD1 = new ModelLayer.DVD(1, "Titanic", "James", 2003);
        dVD2 = new ModelLayer.DVD(2, "Pirates of C", "Jack S", 2007);
        dVDColle1 = new ModelLayer.DVDCollection();
        dVDColle1.addDVD(dVD1);
        dVDColle1.addDVD(dVD2);
        copy1 = new ModelLayer.Copy(100, 190412, 50, dVD1);
        copy2 = new ModelLayer.Copy(101, 190412, 50, dVD1);
        copy3 = new ModelLayer.Copy(200, 190412, 50, dVD2);
        copy4 = new ModelLayer.Copy(201, 190412, 50, dVD2);
        rent1 = new ModelLayer.Rent(1, person3, copy1, 190412, 200412, true, 0);
        rentColl2 = new ModelLayer.RentCollection();
        rentColl2.addRent(rent1);
        rent2 = new ModelLayer.Rent(2, person2, copy4, 190412, 200412, true, 0);
        rentColl2.addRent(rent2);
    }

    /**
     * Tears down the test fixture.
     *
     * Called after every test case method.
     */
    @After
    public void tearDown()
    {
    }
}
